package com.java.enum_;

public enum ColorEnum {
    // RED(1, "红色")相当于public static final ColorEnum RED = new ColorEnum("红色")
    RED("红色"), BLUE("蓝色"), GREEN("绿色");
    
    private String name;
    
    ColorEnum(String name) {
        this.name = name;
    }
    
    public String getName() {return name;}
    
    public void setName(String name) {this.name = name;}
    
    @Override
    public String toString() {
        return "重写toString-" + name;
    }
}
